package com.sumainfor.pc.market.feign.EpcFeign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sumainfor.common.util.JsonResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 功能描述:
 * 房源配置
 *
 * @Auther: zhlu
 * @Date: 2018/12/20 09:55
 * @Description:
 */
public interface EpcFeign {

    /**
     * 功能描述:
     * 新增房源配置
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2018/12/19 17:18
     */
    @PostMapping("/key/hou/AddHousingPlan")
    JsonResult AddHousingPlan(@RequestBody Map<String, Object> params);

    /**
     * 功能描述:
     * 根据房源编号获取房源套餐
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2018/12/22 12:34
     */
    @GetMapping("/key/hou/getHousingPlanList")
    JsonResult getHousingPlanList(@RequestParam Map<String, Object> params);

    /**
     * 功能描述:
     * 从工程部获取房源配置变更的房源
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2018/12/24 15:32
     */
    @GetMapping("/key/hou/getHousingPlanAmendList")
    JsonResult getHousingPlanAmendList();

    /**
     * 功能描述:
     * 管家（市场部）新增维修工单
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/3/8 20:15
     */
    @PostMapping("/key/repair/AddRepair")
    boolean AddRepair(@RequestBody Map<String, Object> params);

    /**
     * 功能描述:
     * 根据管家巡房主编号获取管家维修集合
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/3/9 15:08
     */
    @GetMapping("/key/repair/getHousingRepairList")
    List<Map<String, Object>> getHousingRepairList(@RequestParam Map<String, Object> params);

    /**
     * 功能描述:
     * 市场部经理获取维修中房源
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/4/16 20:18
     */
    @GetMapping("/key/repair/getMatketRepairHousing")
    JsonResult getMatketRepairHousing();

    /**
     * 功能描述:
     * 工程助理维修工单池
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/9 11:26
     */
    @PostMapping("/key/repair/getManagerRepairList")
    JsonResult getManagerRepairList(@RequestBody Map<String, Object> params);

    /**
     * 功能描述:
     * 获取总经办运营部相关统计
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/11 16:19
     */
    @RequestMapping(value = "/key/manager/getManagerGmioCount", method = RequestMethod.POST)
    JsonResult getManagerGmioCount(@RequestBody Map<String, Object> params);

    /**
     * 功能描述:
     * 获取总经办列表详情
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/11 16:19
     */
    @RequestMapping(value = "/key/manager/getManagerGmioCountList", method = RequestMethod.POST)
    JsonResult getManagerGmioCountList(@RequestBody Map<String, Object> params);


    ///////////////////////////////////////////////////////////////////////////
    // 总经办 工程部
    ///////////////////////////////////////////////////////////////////////////

    /**
     * 查询装修  计划数、套数、成本、已付、待付
     *
     * @param miId
     * @param startTime
     * @param endTime
     * @return
     */
    @PostMapping("/provider/key/gmf/getDecoratePlanTableCount")
    Map<String, Object> getDecoratePlanTableCount(@RequestParam("miId") Integer miId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);


    /**
     * 查询子表格数据 装修计划
     *
     * @param size
     * @param current
     * @param miId
     * @param startTime
     * @param endTime
     * @return
     */
    @PostMapping("/provider/key/gmf/selectPlanForSubTable")
    Page<Map<String, Object>> selectPlanForSubTable(@RequestParam("size") Long size, @RequestParam("current") Long current, @RequestParam("miId") Integer miId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);


    /**
     * 查询子表格 装修套数
     *
     * @param size
     * @param current
     * @param miId
     * @param startTime
     * @param endTime
     * @return
     */
    @PostMapping("/provider/key/gmf/selectHousingForSubTable")
    Page<Map<String, Object>> selectHousingForSubTable(@RequestParam("size") Long size, @RequestParam("current") Long current, @RequestParam("miId") Integer miId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);


    /**
     * 查询装修 所需价格
     *
     * @param size
     * @param current
     * @param miId
     * @param startTime
     * @param endTime
     * @return
     */
    @PostMapping("/provider/key/gmf/selectCostForSubTable")
    Page<Map<String, Object>> selectCostForSubTable(@RequestParam("size") Long size, @RequestParam("current") Long current, @RequestParam("miId") Integer miId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);

    /**
     * 查询装修计划房源信息
     *
     * @param params
     * @return
     */
    @PostMapping("/provider/key/gmf/selectPlanHousingTableForAll")
    JsonResult selectPlanHousingTableForAll(@RequestParam Map<String, Object> params);


    /**
     * 查询房源基础配置
     *
     * @param hId    房源主编号
     * @param hConId 房源配置编号
     * @return
     */
    @PostMapping("/key/HousingRepairEva/getHousingConfigList")
    JsonResult getHousingConfigList(@RequestParam("hId") String hId, @RequestParam("hConId") String hConId);

    /**
     * 搜索 工程部用
     *
     * @param keyWord
     * @param roleId
     * @return
     */
    @PostMapping("/key/provider/epc/search/searchForEpc")
    JsonResult searchForEpc(@RequestParam("keyWord") String keyWord, @RequestParam("roleId") Integer roleId);


    @GetMapping("/key/ZhiNengCon/getHoRdInteDeviceConList")
    JsonResult getHoRdInteDeviceConList(@RequestParam Map<String,Object> params);

    @PostMapping("/housekeeper/HoHousingPlan/getHouRdRoomList")
    JsonResult getHouRdRoomList(@RequestBody Map<String,Object> params);


    @PostMapping("/key/ZhiNengCon/getTenRoom")
    JsonResult getTenRoom(@RequestBody Map<String,Object> params);
}
